Revert "Properly handle execution time<->energy conversion in v8 host (#4884)"#4927
Merged
Conversation
cloutiertyler
approved these changes
May 1, 2026
2 tasks
Contributor
Author
|
Just closing this for now, @coolreader18 says they have a better fix for this. |
joshua-spacetime
approved these changes
May 28, 2026
Contributor
joshua-spacetime
left a comment
There was a problem hiding this comment.
Unless @coolreader18 has strong objections, I would say let's merge this now in order to land the fix in master. And we can merge #4930 as a follow up.
Contributor
|
I'm going to merge this since we already know it fixes energy usage. |
pull Bot
pushed a commit
to Abaso007/SpacetimeDB
that referenced
this pull request
Jun 3, 2026
# Description of Changes A sort of followup to/unrevert of clockworklabs#4884, an alternative to clockworklabs#4927. In clockworklabs#3832, we made FunctionBudget a different unit than EnergyQuanta, but there were still many places where we treated them the same and directly converted between them. I got confused by that in clockworklabs#4884, and now this PR properly separates them and corrects the v8 energy calculation. Also, since we now benchmark the same module in rust and typescript in the form of the keynote benchmark, this patch adds a new assertion to that test that the fuel usage of both modules is within 2X of each other. # Expected complexity level and risk 3 - touches energy calculation without reverting the problematic clockworklabs#4884, but I'm confident it's correct this time. # Testing - [x] Verified that the conversion factors make sense for wasmtime and for v8. - [x] Assert that typescript and rust keynote bench runs have similar cpu usage --------- Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
This reverts commit 458eac8.
This rolls back a pricing change that we made to V8 (TypeScript) based modules. This will be applied as a hotfix to 2.2.0.
API and ABI breaking changes
None
Expected complexity level and risk
1 - Just a pricing change.
Testing